import http from "@/utils/http";

import {YN_STREAM} from '@/common/const'

/**
 *  获取资讯列表 
 * @param {*} blockId 板块id
 * @returns promise
 */
export const getInformation = (blockId)=> {
    return http.get(`${YN_STREAM}/gw/ynstream/stream/info/client/titleSkyInfo`, {
        blockId
    })
}

/**
 *  获取更多资讯列表
 * @param {*} blockId 板块id
 * @param  pageNum 每页多少条
 * @param pageSize 第几页
 * @returns promise
 */
 export const getMorInformation = ({blockId,pageSize=1,pageNum=10})=> {
    return http.get(`${YN_STREAM}/gw/ynstream/stream/info/client/titleSkyInfo/list`, {
        blockId,pageSize,pageNum
    })
}

/**
 *  获取客户端新闻详情
 * @param {*} blockId 板块id
 * @param  pageNum 每页多少条
 * @param pageSize 第几页
 * @param stockId     股票ID
 * @param kcType     1非科创版，2：科创板)
 * @returns promise
 */
 export const getNewDetail = ({newId = '',stockId = '',kcType = ''})=> {
    return http.get(`${YN_STREAM}/gw/ynstream/stream/info/client/new/detail`, {
        newId,stockId,kcType
    })
}

